package liangtWorkSpace.factory.headFirstFactory.factory;

/**
 * @ClassName PizzaStore
 * @Description : 基础披萨工厂
 * @Author : LiangT
 * @Date : 2020/7/3 11:15
 */
public abstract class PizzaStore {

    public Pizza orderPizza(String type){
        Pizza pizza = createPizza(type);
        pizza.prepare();
        pizza.bake();
        pizza.cut();
        pizza.box();
        return pizza;
    }

    protected abstract Pizza createPizza(String type);
}
